package com.changyinBus.web.controller.system;

import com.alibaba.fastjson2.JSON;
import com.changyinBus.common.annotation.Log;
import com.changyinBus.common.core.controller.BaseController;
import com.changyinBus.common.core.domain.AjaxResult;
import com.changyinBus.common.core.domain.entity.SysLotteryRecords;
import com.changyinBus.common.core.domain.entity.SysCate;
import com.changyinBus.common.core.page.TableDataInfo;
import com.changyinBus.common.enums.BusinessType;
import com.changyinBus.common.utils.IDGenerator;
import com.changyinBus.system.service.ISysLotteryRecordsService;
import com.changyinBus.system.service.ISysCateService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/system/lottery")
public class SysLotteryRecordsController extends BaseController {
    @Resource
    private ISysLotteryRecordsService sysLotteryRecordsService;

    /**
     * 获取新闻资讯列表
     */
    @PreAuthorize("@ss.hasPermi('system:lottery:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysLotteryRecords lottery) {
        startPage();
        List<SysLotteryRecords> list = sysLotteryRecordsService.selectList(lottery);
        return getDataTable(list);
    }
}
